package server.mapper;

import java.util.Map;

public class Mapper {

    //----------- inner class 通用框架.
    protected abstract static class MapElement<T> {

        //所谓的父类属性.到子类也是子类层次都可以拥有以及使用的.
        public final String name;
        public final T object;

        public MapElement(String name, T object) {
            this.name = name;
            this.object = object;
        }
    }

    //MappHost 继承 MAPElement的框架.
    protected static final class MappedHost extends MapElement<Host> {

        private volatile MapElement<Context>[] contextList = null;


        //构建函数作用,就是生成对象的时候把需要的属性构建好.
        public MappedHost(String name, Host object) {
            super(name, object);
            contextList = new MapElement[10];
        }
    }



}
